using System;
using System.Data;
using System.Collections.Generic;
using System.Data.SqlClient;

namespace DataAccess
{
    public class tbLog : Popular
    {
        public int Id { get; set; }
        public DateTime Date { get; set; }
        public string Thread { get; set; }
        public string Level { get; set; }
        public string Logger { get; set; }

        public string Message { get; set; }
        public string Exception { get; set; } 
        

        Common<tbLog> cm = new Common<tbLog>();
        public bool Insert(Popular b)
        {
            return cm.Insert(b as tbLog, "sp_tbLog_Insert");
        }
        public bool Update(Popular b)
        {
            return cm.UpDate(b as tbLog, "sp_tbLog_Update");
        }
        public bool Delete(object b)
        {
            return cm.Delete(b, "sp_tbLog_Delete");
        }
        public IDataReader Select_ID(object b)
        {
            return cm.Select_ID(b, "sp_tbLog_SelectByID");
        }
        public IDataReader Select_Name(object b)
        {
            return cm.Select_Name(b, "sp_tbLog_SelectByName");
        }
        public IDataReader SelectAll()
        {
            return cm.Select_All("sp_tbLog_SelectAll");
        }
        public List<tbLog> SelectAllToList()
        {
            return cm.SelectAll<tbLog>("sp_tbLog_SelectAll");
        }
    }
}